1. Technical Field
This invention relates to Object Oriented programing, and particularly to the persistence of instances of dynamic objects.
2. Prior Art
When data structures are defined in object terms, the usual manner in which the xe2x80x98classxe2x80x99 of objects can be changed or extended is by making programing code changed which requires recompiling. This is the case for xe2x80x98staticxe2x80x99 objects that are hard coded. Any form of recompiling is undesirable in xe2x80x98livexe2x80x99 computing systems because of the associated xe2x80x98down timexe2x80x99. It is thus desirable to implement class and attribute definitions that obviate the need to recompile code. This can be achieved by the implementation of dynamic objects. Dynamic objects are defined at a meta-level, and have attributes associated with the constituent classes at run-time. In this way, changes can be made to the underlying structure of an object in the meta-level domain, thereby not requiring recompilation. By way of additional background information, principles of Object Oriented programing are described in: xe2x80x9cThe Unified Modeling Language Reference Manualxe2x80x9d by James Rumbaugh, Ivar Jacobsen and Grady Booch, published by Addison-Wesley, December 1998 (ISBN 0-201-30998-X).
Objects are generic in nature and the characteristics of an object are only known at run-time when an instance of an object is instantiated making persistence problematic, given that the object""s attributes/characteristics must be known in order to perform the persistence. Additionally, where there is more than one form of data store or database, an object instance must be able to be configured and directed to each form with ease.
A prior arrangement is disclosed in Published Japanese Patent Application No. 6-67856 (PFU Limited, Murota Norie), published on Mar. 11, 1994. This disclosure teaches the linkage of processing modules, independently of their structure, through use of a management table that can assimilate different data file structures. This strategy is limited to tabled-based database systems, and cannot accommodate structured data types such as composites, arrays and sequences.
The present invention seeks to overcome or at lest ameliorate problems in the prior art.
According to one aspect, the invention provides a method for persisting objects to a database, the method comprising the steps of:
(a) defining a meta-level object;
(b) defining a persistance strategy for said object;
(c) defining one or more attributes for said object;
(d) defining a persistence strategy for one or more of said attributes;
(e) instantiating an object that carries its persistence strategy and its attributes with their respective persistence strategies; and
(f) servicing said instantiated object.
According to another aspect, the invention provides a method for specifying a persistence framework for objects, the method comprising the steps of:
(a) defining a meta-level object;
(b) defining a persistence strategy for said object;
(c) defining one or more attributes for said object; and
(d) defining a persistence strategy for one or more of said attributes.
The persistence strategy can include both storage and retrieval actions. Each persistence strategy can be defined for a definition time and a runtime.
According to another aspect, the invention provides an object persistence framework comprising;
an object definition;
an object persistence definition therefor;
one or more attributes for each object; and
a persistence strategy definition for one or more of said attributes.
The framework can further comprise an intermediary function linking the object definition with the attribute definitions. There can further be a number of associated object definitions associated with the first, each having respective persistence definitions and attributes.
According to yet another aspect, the invention provides a client-server computing system, comprising:
(a) a plurality of client computers each having processor means implementing an application layer, and a memory storing a set of meta-level objects, a persistence strategy definition for each said object, one or more attributes for each said object, and a persistence strategy for one or more of said attributes.
(b) a plurality of server computers, each having processor means implementing an application layer, and a memory storing a set of meta-level objects, a persistence strategy definition for each said object, one or more attributes for each said object, and a persistence strategy for one or more of said attributes.
(c) a database being accessible by said server computers; and
(d) a communications link interconnecting said client machines with said server machines; and
wherein, in response to a persistence command, one or either said client computers and/or server computers instantiates an object from amongst said set that carries with it its persistence strategy and its attributes with their respective persistence strategies, to be persisted in said database.